package com.szpx.mapper;


import com.szpx.entity.MovieFdBean;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;

@Repository
public interface MovieFdMapper extends Mapper<MovieFdBean> {

    @Select("<script>" +
            "SELECT * FROM chw_fillm_mage WHERE 1=1 " +
            "<if test='type != null and type != \"\"'> AND type LIKE CONCAT('%',#{type},'%') </if>" +
            "<if test='fname != null and fname != \"\"'> AND fname LIKE CONCAT('%',#{fname},'%') </if>" +
            "<if test='uptime != null'> AND uptime LIKE CONCAT('%',#{uptime},'%') </if>" +
            "</script>")
    List<MovieFdBean> findMoviesByTypeAndNameAndUptime(@Param("type") String type, @Param("fname") String fname, @Param("uptime") Date uptime);

//更改新推送
}
